package com.landleaf.smarthome.model;

import com.landleaf.smarthome.db.converter.DeviceConverter;

import org.greenrobot.greendao.annotation.Convert;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.io.Serializable;
import java.util.List;

/**
 * When I wrote this, only God and I understood what I was doing
 * Now, God only knows
 * Created by 海航
 * 2020/9/1
 * 功能描述:
 */
@Entity
public class SceneModel implements Serializable {
    private static final long serialVersionUID = 6394048211422324403L;
    @Id(autoincrement = true)
    private Long sceneID = null;
    private String id;
    private int updateFlag;//是否可修改  0不可修改
    private String name;
    @Convert(columnType = String.class, converter = DeviceConverter.class)
    private List<DeviceModel> actions;


    @Generated(hash = 1998093670)
    public SceneModel(Long sceneID, String id, int updateFlag, String name,
                      List<DeviceModel> actions) {
        this.sceneID = sceneID;
        this.id = id;
        this.updateFlag = updateFlag;
        this.name = name;
        this.actions = actions;
    }

    @Generated(hash = 1445206287)
    public SceneModel() {
    }


    public Long getSceneID() {
        return sceneID;
    }

    public void setSceneID(Long sceneID) {
        this.sceneID = sceneID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getUpdateFlag() {
        return updateFlag;
    }

    public void setUpdateFlag(int updateFlag) {
        this.updateFlag = updateFlag;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<DeviceModel> getActions() {
        return actions;
    }

    public void setActions(List<DeviceModel> actions) {
        this.actions = actions;
    }
}
